<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 引入artDialog 组件 -->
    <script src="js/artDialog/artDialog.js?skin=blue"></script>
    <script src="js/common.js"></script>
</head>
<body>
<script>
    function ff(){
        var f = ['error','face-sad','face-smile','question','succeed','warning'];
        return f[getRandom(0,f.length-1)];
    }

    function aa(){
        art.dialog({
            title:'提示',
            content:'欢迎访问',
            icon:ff(),
            lock:true,
            background:'gray',
            opacity:.3,
            id:'aa' /* 防止重复出现*/
        })
    }

    function bb(){
        art.dialog({
            title:'提示',
            content:'欢迎访问',
            time:5  /*5秒后自动关闭*/
        })
    }

    function cc(){
        art.dialog({
            id: 'msg',
            title: '公告',
            content: 'hello world!',
            width: 320,
            height: 240,
            left: '100%',
            top: '100%',
            fixed: true,
            drag: false,
            resize: false,
            time:5,
            esc:false,
            close:function(){  //事件关闭后立即
                location.href = 'http://www.baidu.com'
            }
        })
    }
</script>

<a href="javascript:void(0)" onclick="aa()">效果一</a>&nbsp;
<a href="javascript:void(0)" onclick="bb()">效果二,自动关闭</a>&nbsp;
<a href="javascript:void(0)" onclick="cc()">右下角提示</a>
</body>
</html>